import React from 'react';
import {Button, Space} from "antd";
import { useNavigate,useLocation } from 'react-router-dom';
import GoBack from "@/components/TheGoBack";
const Demo = () => {
    // 跳转页面
    const navigate = useNavigate();
    const goAdd = () => {
        navigate('/demo/add',{
            state: { // 路由参数
                st: "test"
            }
        })
    }
    // 获取路由参数
    const location = useLocation();
    // console.log(location)
    return (
        <Space>
            <Button onClick={()=>goAdd()}>添加</Button>
            <GoBack title={"测试"} extra={"拓展内容支持RC"}/>
        </Space>
    )
};
export default Demo;
